{extend name="Base/base"/}

{block name="body"}
        <div class="main-title">
            <h2>关于我们           </h2>
        </div>
        <div class="with-padding">


            <div class="tab-wrap" style="margin-bottom: 5px">
                <ul class="nav nav-secondary group_nav"></ul>
            </div>
            {notempty name="list"}
            <form action="{:url(request()->action())}"  method="post" class="form-horizontal">
                <label class="item-label">公司名字    </label>
                <div class="controls ">
                    <input type="hidden" name="id" value="{$list.id}">
                    <script id="brief1" name="title" class="edui-default"
                            style="width: 500px;">{$list.title}</script>
                    <p class="lead"></p>
                </div>

                <label class="item-label">公司介绍    </label>
                <div class="controls ">
                    <script id="brief2" name="content" class="edui-default"
                            style="width: 500px;">{$list.content}</script>
                </div>

                <label class="item-label">服务范围    </label>
                <div class="controls ">
                    <script id="brief3" name="server" class="edui-default"
                            style="width: 500px;">{$list.server}</script>

                </div>
                <label class="item-label">成功案例    </label>
                <div class="controls ">
                    <script id="brief4" name="example" class="edui-default"
                            style="width: 500px;">{$list.example}</script>
                </div>
                <label class="item-label">合作企业   </label>
                <div class="controls ">

                    <script id="brief5" name="company" class="edui-default"
                            style="width: 500px;">{notempty name="list.company"}{$list.company}{/notempty}</script>

                </div>
                <label class="item-label">联系方式    </label>
                <div class="controls ">
                    <script id="brief6" name="contact" class="edui-default"
                            style="width: 500px;">{notempty name="list.contact"}{$list.contact}{/notempty}</script>
                </div>
                <div class="form-item">
                    <button class="btn submit-btn ajax-post btn-success" id="submit" type="submit" target-form="form-horizontal">确定</button>  &nbsp;<button onclick="javascript:history.back(-1);return false;" class="btn btn-return">返回</button>  &nbsp;            </div>
            </form>
            {else/}
            <form action="{:url(request()->action())}" name="images" method="post" class="form-horizontal">
                <label class="item-label">公司名字    </label>
                <div class="controls ">
                    <input type="hidden" name="id" value="">
                    <script id="brief1" name="title" class="edui-default"
                            style="width: 500px;"></script>
                    <p class="lead"></p>
                </div>

                <label class="item-label">公司介绍    </label>
                <div class="controls ">
                    <script id="brief2" name="content" class="edui-default"
                            style="width: 500px;"></script>
                </div>

                <label class="item-label">服务范围    </label>
                <div class="controls ">
                    <script id="brief3" name="server" class="edui-default"
                            style="width: 500px;"></script>
                </div>
                <label class="item-label">成功案例    </label>
                <div class="controls ">
                    <script id="brief4" name="example" class="edui-default"
                            style="width: 500px;"></script>
                </div>
                <label class="item-label">合作企业   </label>
                <div class="controls ">

                    <script id="brief" name="company" class="edui-default"
                            style="width: 500px;"></script>

                </div>
                <label class="item-label">联系方式    </label>
                <div class="controls ">
                    <script id="brief6" name="contact" class="edui-default"
                            style="width: 500px;"></script>
                </div>
                <div class="form-item">
                    <button class="btn submit-btn ajax-post btn-success" id="submit" type="submit" target-form="form-horizontal">确定</button>  &nbsp;<button onclick="javascript:history.back(-1);return false;" class="btn btn-return">返回</button>  &nbsp;            </div>
            </form>
            {/notempty}
        </div>


    </div>

</div>
{/block}

{block name="script"}
<script type="text/javascript">
    var  ue_brief;
    $(function () {
        var config = {toolbars:[['source','|','bold','italic','underline','fontsize','forecolor','justifyleft','fontfamily','|','map','emotion','insertimage','insertcode']],zIndex:977,initialFrameWidth:500,initialFrameHeight:400,autoHeightEnabled: false,'topOffset':$('#nav_bar').height()+$('#sub_nav').height()+5};
        ue_brief = UE.getEditor('brief1', config);
        ue_brief = UE.getEditor('brief2', config);
        ue_brief = UE.getEditor('brief3', config);
        ue_brief = UE.getEditor('brief4', config);
        ue_brief = UE.getEditor('brief5', config);
        ue_brief = UE.getEditor('brief6', config);
    });
    $('#datetimepicker').datetimepicker({
        language: "zh-CN",
        autoclose: true,
        format: 'yyyy-mm-dd hh:ii'
    });

$(function () {
        //搜索功能
        $("#search").click(function () {
            var url = $(this).attr('url');
            var query = $('.search-form').find('input').serialize();
            query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
            query = query.replace(/^&/g, '');
            if (url.indexOf('?') > 0) {
                url += '&' + query;
            } else {
                url += '?' + query;
            }
            window.location.href = url;
        });
        //回车搜索
        $(".search-input").keyup(function (e) {
            if (e.keyCode === 13) {
                $("#search").click();
                return false;
            }
        });
        //导航高亮

        //点击排序
        $('.list_sort').click(function () {
            var url = $(this).attr('url');
            var ids = $('.ids:checked');
            var param = '';
            if (ids.length > 0) {
                var str = new Array();
                ids.each(function () {
                    str.push($(this).val());
                });
                param = str.join(',');
            }

            if (url != undefined && url != '') {
                window.location.href = url + '/ids/' + param;
            }
        });
    });
</script>
{/block}